﻿<table>
<tr>
<?php echo form_open('adminProfiles/deleteCourses/'.$id); ?>
	<td colspan="2"><h2 class="title">Предмети</h2></td>
	<td><input type="submit" name="submit" value="Избриши селектирани" /></td>
</tr>
<tr><td colspan="2"><h2>Промени предмети</h2></td></tr>
<?php 
	foreach ($courses as $course)
	{
		echo "<tr><td colspan='2'>".$course->namemk."</td>";
		echo "<td><input type='checkbox' name=".$course->idPrcPk." value=".$course->idPrcPk." /></td></tr>";
	}	
?>
<?php echo form_close(); ?>
<tr><td colspan="2"><h2>Додади предмет</h2></td></tr>

<?php echo form_open('adminProfiles/addCourse/'.$id); ?>
<tr>
	<td>Предмет:</td>
	<td>
		<select name="course" >
			<?php 
				foreach($allCourses as $crs)
					echo "<option value='".$crs->idCrsPk."'>".$crs->namemk."</option>";
			?>
		</select>
	</td>
</tr>
<tr>
	<td>Семестар:</td>
	<td>
		<select name="semester" id="semester">
			<?php 
				for($i=1;$i<=8;$i++)
					echo "<option value='".$i."'>".$i."</option>";
			?>
		</select>
	</td>
</tr>
<tr>
	<td colspan="2"><input type="submit" name="submit" value="Додади" /></td>
</tr>
<?php echo form_close(); ?>

</table>